package com.yonyou.cyxdms.sysAuth.service.entity;

import com.baomidou.mybatisplus.annotation.TableName;
import com.baomidou.mybatisplus.annotation.IdType;
import com.yonyou.cyxdms.framework.bean.entity.base.DMSBasePO;
import com.baomidou.mybatisplus.annotation.Version;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableLogic;
import com.baomidou.mybatisplus.annotation.TableField;

import java.io.Serializable;
import com.yonyou.cyx.function.utils.bean.BeanMapperUtil;
import com.yonyou.cyx.framework.bean.dto.base.BaseDTO;

/**
 * <p>
 * 往来客户与账户关系表
 * </p>
 *
 * @author quankk
 * @since 2019-07-05
 */
@TableName("tr_part_customer_relation")
public class PartCustomerRelationPO extends DMSBasePO<PartCustomerRelationPO> {

    private static final long serialVersionUID = 1L;

    /**
     * 关系ID
     */
        @TableId(value = "RELATION_ID", type = IdType.AUTO)
        private Integer relationId;
    /**
     * tm_emp表主键
     */
    @TableField("EMP_ID")
    private Integer empId;
    /**
     * tr_part_customer_relation表主键
     */
    @TableField("PART_CUSTOMER_ID")
    private Integer partCustomerId;
    /**
     * 密码明码
     */
    @TableField("PASSWORD_SHOW")
    private String passwordShow;
    /**
     * 备注
     */
    @TableField("REMARK")
    private String remark;
    @TableField("IS_DELETED")
    @Version
    @TableLogic
    private Boolean isDeleted;

    public PartCustomerRelationPO() {
        super();
    }


    public Integer getRelationId() {
        return relationId;
    }

    public void setRelationId(Integer relationId) {
        this.relationId = relationId;
    }

    public Integer getEmpId() {
        return empId;
    }

    public void setEmpId(Integer empId) {
        this.empId = empId;
    }

    public Integer getPartCustomerId() {
        return partCustomerId;
    }

    public void setPartCustomerId(Integer partCustomerId) {
        this.partCustomerId = partCustomerId;
    }

    public String getPasswordShow() {
        return passwordShow;
    }

    public void setPasswordShow(String passwordShow) {
        this.passwordShow = passwordShow;
    }

    public String getRemark() {
        return remark;
    }

    public void setRemark(String remark) {
        this.remark = remark;
    }

    public Boolean getDeleted() {
        return isDeleted;
    }

    public void setDeleted(Boolean isDeleted) {
        this.isDeleted = isDeleted;
    }

    @Override
    protected Serializable pkVal() {
        return this.relationId;
    }

    @Override
    public String toString() {
        return "PartCustomerRelationPO{" +
        "relationId=" + relationId +
        ", empId=" + empId +
        ", partCustomerId=" + partCustomerId +
        ", passwordShow=" + passwordShow +
        ", remark=" + remark +
        ", isDeleted=" + isDeleted +
        "}";
    }


    /**
     * 将PO 信息转化为DTO
     *
     * @param dto 需要进行转换的dto
     * @author quankk
     * @since 2018/7/22 0022
     */
    protected <T extends BaseDTO> void transDtoToPo(T dto) {
        BeanMapperUtil.copyProperties(this, dto, "relationId");
    }


}
